<?php require('template/header.php') ?>
  <?php
  $row = $data['food'];
  $fid = $row['fid'];
  $name = $row['name'];
  $price = $row['price'];
  $pic = '../images/'.$row['pic'];
 ?>
 <div id="page-wrapper">
 <div class="container-fluid col-md-offset-1 col-md-10">
 <form class="form-horizontal" method="post" action="index.php?c=food&m=updatefood" enctype="multipart/form-data">
    <div class="form-group">
      <label class="col-md-2 control-label">菜品编号</label>
      <div class="col-md-4">
        <label class="control-label"><?php echo $fid; ?></label>
        <input type="hidden" name="fid" class="form-control" value=<?php echo $fid; ?>></input>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">菜品名称</label>
      <div class="col-md-4">
        <input type="text" name="name" class="form-control" value=<?php echo $name; ?>></input>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">价格</label>
      <div class="col-md-4">
         <input type="number" name="price" class="form-control" value=<?php echo $price; ?>></input>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">图片</label>
      <div class="col-md-4">
        <img class="img-rounded" src="<?php echo $pic ?>" width="80" height="80">
        <input type="file" name="pic"></input>
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-2 control-label">操作</label>
      <div class="col-md-4">
        <input type="submit" value="更新" class="btn btn-default"></input>
        <input type="reset" value="重置" class="btn btn-default"></input>
      </div>
    </div>
 </form>
 </div>


                    </div>
                </div>

            </div>

        </div>
        </div>
<?php require('template/footer.php') ?>